﻿using LJ.EventBus.Abstractions;
using LJ.EventBus.Abstractions.Attributes;
using LJ.EventBus.FastDog.Test.Data;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace LJ.EventBus.FastDog.Test.DependencyInjection;

[EventHandlerAttribute("Test", "Test")]
public class DataTestEventHandler(DataTest dataTest) : IEventHandler<TestEventData>
{
    private readonly DataTest _dataTest = dataTest;



    public Task ExecuteAsync(TestEventData eventData, IDictionary<string, string> heads)
    {
        _dataTest.Count = eventData.Count;

        return Task.CompletedTask;
    }
}
